package org.csu.mypetstore.service;

import org.csu.mypetstore.domain.AlipayTransaction;
import org.csu.mypetstore.persistence.AlipayTransactionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AlipayTransactionService {
    @Autowired
    AlipayTransactionMapper alipayTransactionMapper;

    public void insertTransaction( AlipayTransaction transaction ){
        alipayTransactionMapper.insertTransaction( transaction );
    };

    public AlipayTransaction getTransactionByOutTradeNo( AlipayTransaction transaction ){
        return alipayTransactionMapper.getTransactionByOutTradeNo( transaction );
    }

    public AlipayTransaction getTransactionByAlipayTradeNo( AlipayTransaction transaction ){
        return alipayTransactionMapper.getTransactionByAlipayTradeNo( transaction );
    }

    public void updateTransaction( AlipayTransaction transaction ){
        alipayTransactionMapper.updateTransaction( transaction );
    }



}
